broadway: Use wss: on https: uris
authorAlexander Larsson <alexl@redhat.com>
Mon, 1 Apr 2013 15:29:06 +0000 (17:29 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 1 Apr 2013 15:44:33 +0000 (17:44 +0200)
gdk/broadway/broadway.js

index 50a6b1662ddda8a430c5f1855e2a5260942b3c09..6f7a76536d38115140a95eb6ec59c7c5121488e2 100644 (file)
@@ -2675,7 +2675,7 @@ function connect()
        var params = query_string[1].split("&");
     }
 
-    var loc = window.location.toString().replace("http:", "ws:");
+    var loc = window.location.toString().replace("http:", "ws:").replace("https:", "wss:");
     loc = loc.substr(0, loc.lastIndexOf('/')) + "/socket";
 
     var supports_binary = newWS (loc + "-test").binaryType == "blob";